package com.middle.common.basic.enums;

public enum Status {
	DLE(Byte.parseByte("0"),"停用"),
	Active(Byte.parseByte("1"),"启用");
	
	byte code;
	
	String message;
	
	private Status(byte code,String message) {
		
		this.code  = code;
		this.message = message;
	}

	public static Status find(byte code) {
		Status[] statuses= Status.values();
		for(Status status : statuses) {
			if(status.code == code) {
				return status;
			}
		}
		return null;
	}
	
	public byte code() {
		return code;
	}
}
